package com.zb.vo;

import com.zb.annotation.NumberPattern;
import com.zb.utils.VerificUtil;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.hibernate.validator.constraints.Length;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Pattern;

/**
 * @Author WEN
 * @Date 2024/1/8 0008
 **/
@Data
@ApiModel("出库收货对象")
public class StoreOutboundReceiptVo {
    @NotNull(message = "收货地址类型不能为空")
    @NumberPattern(regexp = "[1|2|3]", required = true, message = "收货地址类型参数不合法")
    @ApiModelProperty(value = "收货地址类型：1-客户，2-服务商仓库，3-工程师仓库", required = true, example = "1")
    private Integer receiptAddrType;

    @NotNull(message = "收货人姓名不能为空")
    @ApiModelProperty(value = "用户表ID/仓库ID", required = true)
    private Long relationId;

    @ApiModelProperty(value = "仓库仓位ID，当仓库启用仓位时生效", example = "0")
    private Long storePositionId;

    @NotBlank(message = "收货人姓名不能为空")
    @Length(max = 100, message = "收货人姓名长度限制 100 个字符以内")
    @ApiModelProperty(value = "收货人姓名", required = true)
    private String receiptName;

    @NotBlank(message = "收货人手机号不能为空")
    @Pattern(regexp = VerificUtil.REGEX_PHONE, message = "收货人手机号格式错误")
    @ApiModelProperty(value = "收货人手机号", required = true)
    private String receiptPhone;

    @NotBlank(message = "收货人地址 -省不能为空")
    @Length(max = 50, message = "收货人地址 -省度限制 50 个字符以内")
    @ApiModelProperty(value = "收货人地址 -省", required = true)
    private String receiptProvince;

    @NotBlank(message = "收货人地址 -县/区不能为空")
    @Length(max = 50, message = "收货人地址 -县/区长度限制 50 个字符以内")
    @ApiModelProperty(value = "收货人地址 -市", required = true)
    private String receiptCity;

    @NotBlank(message = "收货人地址 -县/区不能为空")
    @Length(max = 50, message = "收货人地址 -县/区长度限制 50 个字符以内")
    @ApiModelProperty(value = "收货人地址 -县/区", required = true)
    private String receiptArea;

    @Length(max = 50, message = "收货人地址 -镇长度限制 50 个字符以内")
    @ApiModelProperty(value = "收货人地址 -镇")
    private String receiptTown;

    @NotBlank(message = "收货人详细地址不能为空")
    @Length(max = 200, message = "收货人详细地址长度限制 200 个字符以内")
    @ApiModelProperty(value = "收货人地址 -详细地址", required = true)
    private String receiptAddress;
}
